home *** CD-ROM | disk | FTP | other *** search
- property ancestor, fMovie, fPlayingTape
- global kRoomNames
-
- on birth me
- set ancestor to NewObj("TLayer")
- mITVLayer(me)
- return me
- end
-
- on mITVLayer me
- set aSpr to 28
- set aTV to mNewView(me, "TAnim", aSpr, "TV")
- mStCastNum(aTV, the number of cast "TV")
- set aSpr to 36
- set aCloseTV to mNewView(me, "TMyView", aSpr, "closeTV")
- mPuppetOn(aCloseTV)
- mStCastNum(aCloseTV, the number of cast "closeTV")
- mITVControl(me)
- mIMovie(me)
- mIPlayingTape(me)
- end
-
- on mITVControl me
- set aSpr to 30
- set aNumTVCtls to 6
- set aTVCtlCast to the number of cast "TVControl" - 1
- repeat with aTVCtlCount = 1 to aNumTVCtls
- set aTVCtl to mNewView(me, "TView", aSpr + aTVCtlCount - 1, "TVCtl" & aTVCtlCount)
- mPuppetOn(aTVCtl)
- mStCastNum(aTVCtl, aTVCtlCast + aTVCtlCount)
- end repeat
- end
-
- on mIMovie me
- set aSpr to 29
- set fMovie to mNewView(me, "TMoov", aSpr, "movie")
- end
-
- on mIPlayingTape me
- set fPlayingTape to 0
- end
-
- on mStMovie me, vRoomName, vCkrchNum
- set aRoomNum to getPos(kRoomNames, vRoomName)
- set aMovieName to "M" & vCkrchNum & aRoomNum & ".MOV"
- mStCastNum(fMovie, the number of cast aMovieName)
- updateStage()
- mStMovRate(fMovie, 0)
- mStDirectToStage(fMovie, 1)
- end
-
- on mStPlayingTape me, vTape
- set fPlayingTape to vTape
- end
-
- on mEjectTape me
- if objectp(fPlayingTape) then
- mStCastNum(fMovie, the number of cast "NULL.MOV")
- updateStage()
- mStMovRate(fMovie, 0)
- mEjectFromTV(fPlayingTape)
- end if
- end
-
- on mPlay me
- if the commandDown then
- mStMovRate(fMovie, 2)
- else
- if the optionDown then
- mStMovRate(fMovie, 4)
- else
- if the controlDown then
- mStMovRate(fMovie, 8)
- else
- mStMovRate(fMovie, 1)
- end if
- end if
- end if
- end
-
- on mRev me
- if the doubleClick then
- mStMovTimeBgn(fMovie)
- else
- set aSavedRate to mGtMovRate(fMovie)
- if the optionDown then
- mStMovRate(fMovie, -4)
- else
- if the controlDown then
- mStMovRate(fMovie, -8)
- else
- mStMovRate(fMovie, -2)
- end if
- end if
- repeat while the mouseDown
- updateStage()
- end repeat
- mStMovRate(fMovie, aSavedRate)
- end if
- end
-
- on mFwd me
- if the doubleClick then
- mStMovTimeEnd(fMovie)
- else
- set aSavedRate to mGtMovRate(fMovie)
- if the optionDown then
- mStMovRate(fMovie, 4)
- else
- if the controlDown then
- mStMovRate(fMovie, 8)
- else
- mStMovRate(fMovie, 2)
- end if
- end if
- repeat while the mouseDown
- updateStage()
- end repeat
- mStMovRate(fMovie, aSavedRate)
- end if
- end
-
- on mPause me
- mStMovRate(fMovie, 0)
- end
-
- on mStop me
- mStMovRate(fMovie, 0)
- end
-
- on mShowLayer me
- mShowLayer(ancestor)
- if not (the optionDown) then
- set the colorDepth to 16
- if the colorDepth <> 16 then
- set the colorDepth to 32
- end if
- end if
- end
-
- on mHideLayer me
- set aNullCastNum to the number of cast "NULL.MOV"
- mStCastNum(fMovie, aNullCastNum)
- mStMovRate(fMovie, 0)
- mStMovTimeBgn(fMovie)
- mHideLayer(ancestor)
- set the colorDepth to 8
- end
-